package com.luchao.springcloudconsumerdept81.config;

import com.luchao.springcloudconsumerdept81.rule.LuChaoRule;
import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule() {
        //配置多种策略，也可以自定义
//        return new RandomRule();  //随机
//        return new WeightedResponseTimeRule();   //响应速度权重
        return new LuChaoRule();  //自定义规则
    }
}
